module.exports = function (Sequelize,sequelize) {
    const {STRING,INTEGER,DATE} = Sequelize
    return sequelize.define('sys_dictionary_items', {
        id: {
            type: INTEGER,
            primaryKey: true,
            autoIncrement: true,
            allowNull: false,
            comment: "id",
        },
        dict_id: {
            type: INTEGER,
            allowNull: true,
            comment: "父级id",
        },
        name: {
            type: STRING,
            allowNull: true,
            comment: "名称",
        },
        params: {
            type: STRING,
            allowNull: true,
            comment: "参数",
        },
        code: {
            type: STRING,
            allowNull: true,
            comment: "编码",
        },
        value: {
            type: STRING,
            allowNull: true,
            comment: "字典值",
        },
         seq: {
            type: INTEGER,
            allowNull: true,
            comment: '排序号',
        },

        create_time: {
            type: DATE,
            defaultValue: new Date(),
            allowNull: true,
            comment: "创建时间",
        },
        update_time: {
            type: DATE,
            defaultValue: new Date(),
            allowNull: true,
            comment: "修改时间",
        }
    }, {
        //使用自定义表名
        freezeTableName: true,
        //去掉默认的添加时间和更新时间
        timestamps: false,
    });
}
